/*
 * HexagonButton.cpp
 *
 *  Created on: Oct 23, 2008
 *      Author: tfannes
 */

#include "HexagonButton.h"
#include <QPainter>

HexagonButton::HexagonButton()
: pBordPixmap(0), pClickableSurface(0)
{
}

HexagonButton::~HexagonButton()
{
}

void HexagonButton::paintEvent(QPaintEvent * /*event*/)
{
	QPainter painter(this);

//	if (drawableSurface != 0)
//	{
//		// draw the image
//		painter.drawPixmap(0, 0, *drawableSurface);
//	}
//	else

	if (pClickableSurface != 0)
	{
		// draw the polygon in black
		painter.setRenderHint(QPainter::Antialiasing, true);
		painter.setPen(Qt::blue);
		painter.setBrush(Qt::SolidPattern);
		painter.drawPolygon(*pClickableSurface);
	}
}
